<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class CreateTodoStageInStageInTable extends AbstractMigration
{

    public function up()
    {
        $this->table('stage')
            ->changeColumn('type', 'enum', ['values' => 'standard_meeting,standard_review,default,to_do', 'default' => 'default', 'comment' => '模板类型:standard_meeting 标准会议,standard_review 标准审核 to_do 生产任务'])
            ->save();

        $this->table('template_todo')
            ->changeColumn('type', 'enum', ['values' => 'standard_meeting,standard_review,default,to_do', 'default' => 'default', 'comment' => '模板类型:standard_meeting 标准会议待办,standard_review 标准审核 to_do 生产任务'])
            ->save();

    }

    public function down()
    {
        $this->table('stage')
            ->addColumn('type', 'enum', ['values' => 'standard_meeting,standard_review,default', 'default' => 'default', 'comment' => '模板类型:standard_meeting 标准会议,standard_review 标准审核'])
            ->save();

        $this->table('template_todo')
            ->changeColumn('type', 'enum', ['values' => 'standard_meeting,standard_review,default', 'default' => 'default', 'comment' => '模板类型:standard_meeting 标准会议待办,standard_review 标准审核'])
            ->save();
    }
}